﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.ServiceModel;
using WCFDuplex.Services;

namespace WCFDuplex.Host
{
    class Program
    {
        static void Main(string[] args)
        {
            ServiceHost host = new ServiceHost(typeof(WCFDuplex.Services.MessageService));
            host.Open();

            List<WCFDuplex.Services.IMessageServiceCallback> list =
                WCFDuplex.Services.ChannelManager.GetInstance().GetAllChannels();
            if (list != null && list.Count > 0)
            {
				//被他人修改
                foreach (IMessageServiceCallback callback in list)
                {
                    callback.BoradCastMessage("sssssssssssssssssssssss");
                } 
            }
        }
    }
}
